//
//  LZSelectPicListCell.m
//  DoctorFAQs
//
//  Created by langZai on 2017/3/28.
//  Copyright © 2017年 zjq. All rights reserved.
//

#import "LZSelectPicListCell.h"

@implementation LZSelectPicListCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initlizeInterface];
    }
    return self;
}
- (void)initlizeInterface {
    self.CimageView = [[UIImageView alloc] init];
    self.timeLabel = [[UILabel alloc] init];
    
    self.selectBtn = [[UIButton alloc] init];
    [self.selectBtn setBackgroundImage:[UIImage imageNamed:@"btn_Choice_none"] forState:UIControlStateNormal];
    [self.selectBtn setBackgroundImage:[UIImage imageNamed:@"btn_Choice"] forState:UIControlStateSelected];
    self.selectBtn.userInteractionEnabled = NO;
    
    [self.contentView addSubview:self.CimageView];
    [self.contentView addSubview:self.timeLabel];
    [self.contentView addSubview:self.selectBtn];
    
    [self.CimageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.equalTo(self.contentView);
        make.height.offset(80*ysIZE);
        
    }];
    [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.CimageView.mas_bottom).offset(5*ysIZE);
        make.height.offset(15*ysIZE);
        make.width.equalTo(self.CimageView);
        make.centerX.equalTo(self.CimageView);
    }];
    
    [self.selectBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.offset(20*xsIZE);
        make.top.left.equalTo(self.contentView).offset(5*xsIZE);
    }];
}

- (void)setLzPicModel:(LZPicModel *)lzPicModel {
    _lzPicModel = lzPicModel;
    [self.CimageView sd_setImageWithURL:[NSURL URLWithString:_lzPicModel.img_min]placeholderImage:DefaultsIcon];
    
}
@end
